home *** CD-ROM | disk | FTP | other *** search
/ What PC? 2000 May / What PC May 2000 / wpcmay00.iso / DXRS / Whatpc23.dxr / 00002.ls < prev    next >
Encoding:
Text File  |  2000-03-08  |  1.6 KB  |  70 lines

  1. on initialiseGlobals
  2.   global navMenuStatus
  3.   set navMenuStatus to "off"
  4. end
  5.  
  6. on openFirstWindow fname
  7.   global whatPCWindow
  8.   if objectp(whatPCWindow) then
  9.     forget(whatPCWindow)
  10.   end if
  11.   set whatPCWindow to window "WhatPC"
  12.   set the windowType of whatPCWindow to 2
  13.   set the fileName of whatPCWindow to the pathName & fname
  14.   set the rect of whatPCWindow to rect(0, 0, 640, 480)
  15.   open(whatPCWindow)
  16. end
  17.  
  18. on openFile fname
  19.   global whatPCWindow
  20.   if objectp(whatPCWindow) then
  21.     forget(whatPCWindow)
  22.   end if
  23.   set whatPCWindow to window "WhatPC"
  24.   set the windowType of whatPCWindow to 2
  25.   set the fileName of whatPCWindow to the pathName & fname
  26.   set the rect of whatPCWindow to rect(0, 0, 640, 480)
  27.   open(whatPCWindow)
  28.   showNavMenu()
  29. end
  30.  
  31. on openNavigationMenu
  32.   global NavMenuWindow
  33.   if objectp(NavMenuWindow) then
  34.     forget(NavMenuWindow)
  35.   end if
  36.   set NavMenuWindow to window "Nav Menu"
  37.   set the windowType of NavMenuWindow to 2
  38.   set the fileName of NavMenuWindow to the pathName & "navmenu"
  39.   set the rect of NavMenuWindow to rect(0, 0, 192, 480)
  40.   open(NavMenuWindow)
  41.   set the modal of NavMenuWindow to 1
  42. end
  43.  
  44. on showNavMenu
  45.   global NavMenuWindow, navMenuStatus
  46.   if navMenuStatus = "on" then
  47.     set navMenuStatus to "off"
  48.     closeNavigationMenu()
  49.     put "menu closed"
  50.   else
  51.     set navMenuStatus to "on"
  52.     openNavigationMenu()
  53.     put "menu open"
  54.   end if
  55.   updateStage()
  56. end
  57.  
  58. on closeNavigationMenu
  59.   global NavMenuWindow
  60.   close(NavMenuWindow)
  61. end
  62.  
  63. on quitWhatPC
  64.   global whatPCWindow
  65.   if objectp(whatPCWindow) then
  66.     forget(whatPCWindow)
  67.   end if
  68.   quit()
  69. end
  70.